import React from 'react'
import { createRoot } from 'react-dom/client'

class Animal {
  constructor(name, type) {
    this.name = name
    this.type = type
  }
  eat() {
    console.log('吃东西')
  }
}
class Dog extends Animal {
  constructor(name, type) {
    super(name, type)
    this.leg = 4
  }
  bark() {
    console.log('汪汪汪')
  }
}
class Brid extends Animal {
  constructor(name, type) {
    super(name, type)
    this.leg = 2
  }
  fly() {
    console.log('起飞咯')
  }
}
const wc = new Dog('旺财', '狗')
console.log(wc)
wc.bark()
const bd = new Brid('伯德', '鸟')
console.log(bd)
bd.fly()
// ReactDOM.render(element, document.querySelector('#root'))
// createRoot(document.querySelector('#root')).render(ele)
